package com.atguigu.dga230315.governance.demo;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class StreamAPIDemo {
    public static void main(String[] args) {
        List<Integer> integers = Arrays.asList(1, 2, 3, 4, 5);
        List<Integer> result = integers.stream().map(num -> num * num).collect(Collectors.toList());
        System.out.println(result);
    }
}
